package cn.sxgan.common.entity.vo;

import java.util.List;
import java.util.Map;

public record SystemInfoVO(
        SystemInfo systemInfo,
        CpuInfo cpuInfo,
        MemoryInfo memoryInfo,
        List<DiskInfo> diskInfoList,
        JvmInfo jvmInfo,
        NetworkInfo networkInfo
) {
    public record SystemInfo(
            String osName,
            String osVersion,
            String osArchitecture,
            String computerName,
            String userName,
            String kernelVersion,
            String uptime
    ) {
    }
    
    public record CpuInfo(
            double currentUsage,
            double loadAverage
    ) {
    }
    
    public record MemoryInfo(
            long totalMemory,
            long availableMemory,
            long usedMemory,
            long freeMemory,
            double usagePercentage
    ) {
    }
    
    public record DiskInfo(
            String mountPoint,
            String fileSystem,
            String totalSpace,
            String usedSpace,
            String freeSpace,
            String usagePercentage
    ) {
    }
    
    public record JvmInfo(
            String jvmName,
            String jvmVersion,
            String jvmVendor,
            String jvmHome,
            long totalMemory,
            long freeMemory,
            long usedMemory,
            long maxMemory,
            double memoryUsagePercentage,
            long uptime,
            String startTime,
            Map<String, String> inputArguments,
            Map<String, String> systemProperties
    ) {
    }
    
    public record NetworkInfo(
            String hostName,
            String ipAddress,
            String macAddress
    ) {
    }
}